//
//  BaseAnimator.m
//  UIViewControllerTransitionDemo
//
//  Created by Guo Rui on 2017/7/3.
//  Copyright © 2017年 GR Harry. All rights reserved.
//

#import "BasePresentAnimator.h"

@interface BasePresentAnimator ()
@property (assign, nonatomic) BOOL isDismiss;
@end

@implementation BasePresentAnimator
- (instancetype)initWithDismiss:(BOOL)isDismiss {
    if (self = [super init]) {
        self.isDismiss = isDismiss;
    }
    return self;
}

- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext {
    return 0.f;
}

- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext {
    if (self.isDismiss) {
        [self dismissTransition:transitionContext];
    }
    else {
        [self presentTransition:transitionContext];
    }
}

- (void)dismissTransition:(id<UIViewControllerContextTransitioning>)transitionContext {
    
}

- (void)presentTransition:(id<UIViewControllerContextTransitioning>)transitionContext {
    
}

@end
